<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="cloudsupport_v2beta.html">Google Cloud Support API</a> . <a href="cloudsupport_v2beta.media.html">media</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#download">download(name, x__xgafv=None)</a></code></p>
<p class="firstline">Download a file attached to a case. When this endpoint is called, no "response body" will be returned. Instead, the attachment's blob will be returned. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```</p>
<p class="toc_element">
  <code><a href="#download_media">download_media(name, x__xgafv=None)</a></code></p>
<p class="firstline">Download a file attached to a case. When this endpoint is called, no "response body" will be returned. Instead, the attachment's blob will be returned. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```</p>
<p class="toc_element">
  <code><a href="#upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p>
<p class="firstline">Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="download">download(name, x__xgafv=None)</code>
  <pre>Download a file attached to a case. When this endpoint is called, no &quot;response body&quot; will be returned. Instead, the attachment&#x27;s blob will be returned. Note: HTTP requests must append &quot;?alt=media&quot; to the URL. EXAMPLES: cURL: ```shell name=&quot;projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ &quot;https://cloudsupport.googleapis.com/v2/$name:download?alt=media&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) request = supportApiService.media().download( name=&quot;projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR&quot; ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?alt=media&quot; print(request.execute()) ```

Args:
  name: string, The name of the file attachment to download. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # # gdata.* are outside protos with mising documentation
  &quot;algorithm&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;bigstoreObjectRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;compositeMedia&quot;: [ # # gdata.* are outside protos with mising documentation
    { # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
  ],
  &quot;contentType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;contentTypeInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;bestGuess&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;fromBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;fromFileName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;fromHeader&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;fromUrlPath&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
  &quot;diffChecksumsResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;checksumsLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
    &quot;chunkSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;objectLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
    &quot;objectSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;diffDownloadResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;objectLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
  },
  &quot;diffUploadRequest&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;checksumsInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
    &quot;objectInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
    &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;diffUploadResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;originalObject&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
      &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
      &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
        &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
        &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      },
      &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
      &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    },
  },
  &quot;diffVersionResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;objectSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;downloadParameters&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;allowGzipCompression&quot;: True or False, # # gdata.* are outside protos with mising documentation
    &quot;ignoreRange&quot;: True or False, # # gdata.* are outside protos with mising documentation
  },
  &quot;filename&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;hashVerified&quot;: True or False, # # gdata.* are outside protos with mising documentation
  &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;isPotentialRetry&quot;: True or False, # # gdata.* are outside protos with mising documentation
  &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;mediaId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
    &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
    &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  },
  &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;sha256Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;timestamp&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
  &quot;token&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
}</pre>
</div>

<div class="method">
    <code class="details" id="download_media">download_media(name, x__xgafv=None)</code>
  <pre>Download a file attached to a case. When this endpoint is called, no &quot;response body&quot; will be returned. Instead, the attachment&#x27;s blob will be returned. Note: HTTP requests must append &quot;?alt=media&quot; to the URL. EXAMPLES: cURL: ```shell name=&quot;projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ &quot;https://cloudsupport.googleapis.com/v2/$name:download?alt=media&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) request = supportApiService.media().download( name=&quot;projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR&quot; ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?alt=media&quot; print(request.execute()) ```

Args:
  name: string, The name of the file attachment to download. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  The media object as a string.

    </pre>
</div>

<div class="method">
    <code class="details" id="upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code>
  <pre>Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo &quot;This text is in a file I&#x27;m uploading using CSAPI.&quot; \ &gt; &quot;./example_file.txt&quot; case=&quot;projects/some-project/cases/43594844&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ --data-binary @&quot;./example_file.txt&quot; \ &quot;https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) file_path = &quot;./example_file.txt&quot; with open(file_path, &quot;w&quot;) as file: file.write( &quot;This text is inside a file I&#x27;m going to upload using the Cloud Support API.&quot;, ) request = supportApiService.media().upload( parent=&quot;projects/some-project/cases/43595344&quot;, media_body=file_path ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?attachment.filename=uploaded_via_python.txt&quot; print(request.execute()) ```

Args:
  parent: string, Required. The name of the case or Cloud resource to which the attachment should be attached. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for the CreateAttachment endpoint.
  &quot;attachment&quot;: { # An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they&#x27;re associated on a &quot;case&quot; level, not a &quot;comment&quot; level. # Required. The attachment to be created.
    &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the attachment was created.
    &quot;creator&quot;: { # An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case. # Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
      &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
      &quot;email&quot;: &quot;A String&quot;, # The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use `username` instead.
      &quot;googleSupport&quot;: True or False, # Output only. Whether the actor is a Google support actor.
      &quot;username&quot;: &quot;A String&quot;, # Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
    },
    &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment (e.g. `&quot;graph.jpg&quot;`).
    &quot;mimeType&quot;: &quot;A String&quot;, # Output only. The MIME type of the attachment (e.g. text/plain).
    &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of the attachment.
    &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. The size of the attachment in bytes.
  },
}

  media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
  media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they&#x27;re associated on a &quot;case&quot; level, not a &quot;comment&quot; level.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the attachment was created.
  &quot;creator&quot;: { # An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case. # Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
    &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
    &quot;email&quot;: &quot;A String&quot;, # The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use `username` instead.
    &quot;googleSupport&quot;: True or False, # Output only. Whether the actor is a Google support actor.
    &quot;username&quot;: &quot;A String&quot;, # Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
  },
  &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment (e.g. `&quot;graph.jpg&quot;`).
  &quot;mimeType&quot;: &quot;A String&quot;, # Output only. The MIME type of the attachment (e.g. text/plain).
  &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of the attachment.
  &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. The size of the attachment in bytes.
}</pre>
</div>

</body></html>